package cn.iocoder.yudao.module.infrastructure.messy.vo;

import cn.binarywang.wx.miniapp.bean.WxMaCodeLineColor;
import io.swagger.v3.oas.annotations.media.Schema;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.validation.constraints.NotEmpty;
import lombok.Data;
import org.springframework.beans.factory.annotation.Value;

/**
 * <pre>
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 *  这里是文件说明
 * OOoO0OOoO0OOOooo0oOOOO0OOOOO0oooOO0ooOOO0Ooooo0OOOOo0ooooO0OOooo0Ooooo0OOOOO
 * </pre>
 *
 * @author 山野羡民（1032694760@qq.com）
 * @since 2024/12/31
 */
@Tag(name = "用户 App - 小程序码创建 Request VO")
@Data
public class AppWxaCodeCreateReqVO {

    @Schema(description = "要打开的小程序版本，默认为release：release-正式版、trial-体验版、develop-开发版", example = "release")
    @NotEmpty(message = "微信小程序版本不能为空")
    @Value("${yudao.wxa-code.env-version:release}")
    private String envVersion;

    @Schema(description = "最大32个可见字符，只支持数字，大小写英文以及部分特殊字符：!#$&'()*+,/:;=?@-._~，其它字符请自行编码为合法字符")
    private String scene;

    @Schema(description = "小程序页面路径", example = "pages/index/index")
    private String page;

    @Schema(description = "是否检查 page 是否存在，默认true", example = "true")
    private Boolean checkPath = true;

    @Schema(description = "二维码的宽度，默认430", example = "430")
    private Integer width = 430;

    @Schema(description = "自动配置线条颜色，默认true", example = "true")
    private Boolean autoColor = true;

    @Schema(description = "autoColor 为 false 时生效，使用 rgb 设置颜色", example = """
            {"r":"0","g":"0","b":"0"}
            """)
    private WxMaCodeLineColor lineColor;

    @Schema(description = "是否需要透明底色，默认false", example = "false")
    private Boolean isHyaline = false;

}
